﻿using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
using XLua;
namespace Gdmec.UI
{
    [LuaCallCSharp]
    public class UIScrollRect : ScrollRect
    {
        public LuaFunction onDrop;

        /// <summary>
        /// 拖
        /// </summary>
        /// <param name="eventData"></param>
        public override void OnDrag(PointerEventData eventData)
        {
            base.OnDrag(eventData);
            if (onDrop != null) onDrop.Call();
        }

        public void Close()
        {
            onDrop = null;
        }
    }
}
